package com.test.cloud.provider.controller;

import com.test.cloud.provider.pojo.User;
import org.springframework.web.bind.annotation.*;

/**
 * @author 徒有琴
 */
@RestController
public class ProviderController {

    @GetMapping("/simple/{id}")
    public User getUserById(@PathVariable Integer id) {
        //模拟从数据库中拿到的数据
        User user = new User();
        user.setId(id);
        user.setName("user8081" + id);
        return user;
    }
//    @PostMapping("/simple/{id}")
//    public User getUserById(){
//
//    }
}
